﻿<AvalonDock:DockableContent x:Class="Dispatcher.Views.CommonTreeView"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:AvalonDock="clr-namespace:AvalonDock;assembly=AvalonDock"
                            Title="Tree View" Height="300" Width="300">
    <AvalonDock:DockableContent.Resources>

        <ResourceDictionary x:Key="MergedResources">
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="\Views\ResourceDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

    </AvalonDock:DockableContent.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <ComboBox Height="21" Grid.Row="0" 
                  ItemsSource="{Binding EntitySetNames}" 
                  ItemTemplate="{StaticResource EntitySetTemplate}"
                  SelectedItem="{Binding SelectedEntitySetName, Mode=TwoWay}"/>
        <TreeView Grid.Row="1" DataContext="{Binding TreeViewModel, Mode=TwoWay}">
            <TreeViewItem Name="Tree" ItemsSource="{Binding Items}" Header="Items" AllowDrop="False" MouseMove="Tree_MouseMove"/>
        </TreeView>
    </Grid>
</AvalonDock:DockableContent>
